<template>
  <el-table-column :label="label">
    <template slot-scope="{ row }">
      <el-image
        v-if="row[prop]"
        style="width: 100px; height: 100px"
        :src="row[prop]"
        :preview-src-list="[row[prop]]"
      />
    </template>
  </el-table-column>
</template>

<script>
export default {
  name: 'TableColumnImage',
  props: {
    label: String,
    prop: String,
  },
};
</script>
